package com.minedata.authorization.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.minedata.authorization.bean.UserBean;
import com.minedata.authorization.service.UserService;

@RestController
@RequestMapping("/user")
@ComponentScan(basePackages = { "com.minedata.authorization.service" })
public class UserController {
	@Autowired
	private UserService userService;
	
	@RequestMapping(value="/find/{username}")
	public @ResponseBody UserBean findByUsername(@PathVariable String username){
		return userService.findByUsername(username);
	}
	
}
